package com.yb.oldlearning;

import java.util.concurrent.ThreadFactory;

public class DaemonThreadFactory implements ThreadFactory{
	//要重写newThread方法
	public Thread newThread(Runnable r){
		Thread thread = new Thread(r);
		thread.setDaemon(true);
		return thread;
	}
}
